
<?php
echo $this->partial('partials/header.pageDetails.phtml', array(
    //'pageTitle' => 'Gestion de la structure des pages',
    //'pageDescription' => 'Sur cette page, vous pouvez gérer la structure des pages en y ajoutant les blocs désirés. Pour ajouter un bloc, faites glisser l\'icône vers l\'endroit désiré.'
    'pageTitle' => $this->getCibleText('dashboard_page_title'),
    'pageDescription' => $this->getCibleText('dashboard_page_description')
));
?>

<div id="dashboardMain">

    <div id="dashboardMain_left">
        <h1><?php echo $this->getCibleText('dashboard_data_management') ?></h1>

        <?php $modules = Cible_FunctionsModules::getModulesList(); //$this->modules ?>
        <ul class="list_without_style dashboard_module_list">
            <?php // loops through the modules ?>
            <?php foreach ($modules as $module): ?>

            <?php

                $action_links = '';

                $access = false;

                foreach($module['actions'] as $action){

                    if( $this->aclIsAllowed($module['M_MVCModuleTitle'], $action['permission'])){
                        $access = true;

                        $action_links .= '<li>';
                        $action_links .= $this->link(
                            "{$this->baseUrl()}/{$module['M_MVCModuleTitle']}/{$action['controller']}/{$action['action']}/",
                            $this->getCibleText('management_module_' . $module['M_MVCModuleTitle'] . '_' . str_replace('-', '_', $action['action'])) . (($module['M_MVCModuleTitle'] == 'text' && $action['action'] == 'list-approbation-request') ? Cible_FunctionsGeneral::getApprobationRequest('text') : '')
                        );
                        $action_links .= '</li>';
                    }
                }

                if( !$access)
                    continue;

            ?>
                <li class="list_icons"><img width="48" height="48" class="imgIcon_floatLeft" src="<?php echo $this->baseUrl() ?>/<?php echo($module['M_MVCModuleTitle'])?>/index/get-icon/format/48x48" />
                    <div><strong><?php echo $this->getCibleText($module['M_MVCModuleTitle'] . '_module_name') ?></strong>
                        <ul class="list_without_style dashboard_module_list_link">
                            <?php echo $action_links ?>
                        </ul>
                    </div>
                </li>
            <?php endforeach; ?>
        </ul>
    </div>

    <div id="dashboardMain_right">
        <!--<div id="dashboardMain_right_inside">
            <h1><?php echo $this->getCibleText('dashboard_reminder_title') ?></h1>
            <ul class="list_without_style dashboard_new_activities">
                <li><a href="#">Nouvelles r�ponses au sondage</a> (3)</li>
                <li><a href="#">Nouveaux billets sur le blogue</a> (5)</li>
                <li><a href="#">Nouveaux �v�nements ajout�s</a> (2)</li>
            </ul>
        </div>-->

        <div id="dashboardMain_right_bottom">

            <?php if( $this->isAdministrator() ): ?>

                <h1><?php echo $this->getCibleText('dashboard_administration_title') ?></h1>

                <ul class="list_without_style dashboard_administration_section">
                    <li><a href="<?php echo $this->baseUrl() ?>/utilities/reports/reports/"><?php echo $this->getCibleText('dashboard_administration_reports_management') ?></a></li>
                </ul>
                <h2><?php echo $this->getCibleText('dashboard_administration_website_title') ?></h2>
                <ul class="list_without_style dashboard_administration_section">
                    <li><a href="<?php echo $this->baseUrl() ?>/page/manage/structure/"><?php echo $this->getCibleText('dashboard_administration_website_sitemap_management') ?></a></li>
                    <li><a href="<?php echo $this->baseUrl() ?>/page/manage/menu/"><?php echo $this->getCibleText('dashboard_administration_website_menu_structure') ?></a></li>
                    <li><a href="<?php echo $this->baseUrl() ?>/search/index/reindexing/"><?php echo $this->getCibleText('dashboard_administration_website_reindexing') ?></a></li>
                    <li><a href="<?php echo $this->baseUrl() ?>/utilities/index/google-analytics/"><?php echo $this->getCibleText('dashboard_administration_utilities_googleAnalytics') ?></a></li>
                </ul>

                <h2><?php echo $this->getCibleText('dashboard_administration_administrators_title') ?></h2>
                <ul class="list_without_style dashboard_administration_section">
                    <li><a href="<?php echo $this->baseUrl() ?>/administrator-group/index/order/EGI_Name/order-direction/ASC"><?php echo $this->getCibleText('dashboard_administration_administrators_groups_management') ?></a></li>
                    <li><a href="<?php echo $this->baseUrl() ?>/administrator/index/order/EU_FName/order-direction/ASC"><?php echo $this->getCibleText('dashboard_administration_administrators_administrator_management') ?></a></li>
                </ul>

                <h2><?php echo $this->getCibleText('dashboard_administration_static_text_title') ?></h2>
                <ul class="list_without_style dashboard_administration_section">
                    <li><a href="<?php echo $this->baseUrl() ?>/static-texts/index/order/ST_Desc_backend/order-direction/ASC"><?php echo $this->getCibleText('dashboard_administration_static_text_description') ?></a></li>
                    <li><a href="<?php echo $this->baseUrl() ?>/utilities/references/references/"><?php echo $this->getCibleText('dashboard_administration_references_description') ?></a></li>
                </ul>

                    <?php if ($this->hasProfile): ?>
                    <h2><?php echo $this->getCibleText('dashboard_administration_profil_list') ?></h2>
                    <ul class="list_without_style dashboard_administration_section">
                        <li><a href="<?php echo $this->baseUrl() ?>/users/index/general/order/lastName/order-direction/ASC"><?php echo $this->getCibleText('dashboard_administration_profil_list_description') ?></a></li>
                    </ul>
                <?php endif;
                if($this->hasVideos){
                ?>
                <h2><?php echo $this->getCibleText('dashboard_administration_video') ?></h2>
                <ul class="list_without_style dashboard_administration_section">
                    <li><a href="<?php echo $this->baseUrl() ?>/video/index/list/order/id/order-direction/ASC">
                            <?php echo $this->getCibleText('dashboard_administration_video_description') ?>
                        </a>
                    </li>
                </ul>
                <?php
                }
                ?>

            <?php endif; ?>
        </div>
    </div>

    <hr class="clear_both" />

</div>